package com.suray.rgv60.util;

/**
 * 6代车任务类型
 */
public enum RgvTaskType {
    INVALID(-1, "无效"),
    RGV_60_TASK(1, "6.0车任务"),
    SON_TASK(2, "子车任务"),
    ;

    private int value;
    private String des;

    RgvTaskType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static RgvTaskType parseType(int value) {
        for (RgvTaskType taskType : RgvTaskType.values()) {
            if (taskType.value == value) {
                return taskType;
            }
        }

        return INVALID;
    }

    @Override
    public String toString() {
        return des;
    }
}
